<?php

namespace App\Http\Requests\Api;

use App\Http\Requests\BaseRequest;

class RoleRequest extends BaseRequest
{
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'cn_name' => 'required',
            'level' => 'required',
        ];
    }

    public function messages()
    {
        return [
            'cn_name.required' => '角色名不能为空',
            'level.required' => '角色等级不能为空',
        ];
    }
}
